#ifndef CHARACTER_H
#define CHARACTER_H

#include "Obj.h"
#include "../entity/EntityCharacter.h"
#include "../entity/EntityCharacterAvatar.h"

class Character : public Obj {
    UG_PROPERTY_FULL(int, characterId, CharacterId);
    UG_PROPERTY_FULL(std::string, name, Name);
    UG_PROPERTY_FULL(BigNumber*, cost, Cost);
    UG_PROPERTY_FULL(double, attackTime, AttackTime);
    UG_PROPERTY_FULL(BigNumber*, dps, Dps); // damage per seconds
    UG_PROPERTY_FULL(BigNumber*, maxDps, MaxDps);
    UG_PROPERTY_FULL(BigNumber*, characterMoney, CharacterMoney);
    UG_PROPERTY_FULL(BigNumber*, moneyPerSec, MoneyPerSec);
    UG_PROPERTY_FULL(BigNumber*, moneyPerAtt, MoneyPerAtt);
    UG_PROPERTY_FULL(__Array*, upgradeLevelEarn, UpgradeLevelEarn);
    UG_PROPERTY_FULL(int, level, Level);
    UG_PROPERTY_FULL(int, lastNoti, LastNoti);
    UG_PROPERTY_FULL(bool, hasNoti, HasNoti);
    UG_PROPERTY_FULL(bool, upgradeAvailable, UpgradeAvailable);
    UG_PROPERTY_FULL(int, upgradeLevel, UpgradeLevel);
    UG_PROPERTY_FULL(float, timeToNextUpgrade, TimeToNextUpgrade);
protected:
    Label* statusLabel;
private:
    Character();
    virtual ~Character();
    virtual bool init();
public:
    CREATE_FUNC(Character);
    void initCharacter(int characterId, int specialLevel);
    void initUpgradeLevel(int numberOfUpgradeLevel);
    void upgradeCharacter(int specialLevel);
    void upLevel(EntityCharacter* ettCharacter, int level, int specialLevel);
    char* getAnimation();
    int getNextLevel();
    void updateStatusNormal();
    void updateStatusLevelUp();
    void updateStatusFace();
};

#endif /* OBJ_H */
